refactor: 优化播放器组件,修复触摸事件处理,增强进度条提示功能#21
Merged
Merged
Conversation
主要改动: - AMLL 歌词组件添加触摸锁定与帧 delta 上限,防止滑动冲突和跳帧 - MainPlayer 重构拖拽开启全屏播放器逻辑: - 将 pointer 事件绑定到底栏本体 (.main-player-body),避免进度条误触 - 新增 initDragOpen 重试机制(最多 8 帧),解决 Transition 异步挂载竞态 - 新增 pendingCloseFinalize 机制,处理关闭动作被打断时的卡死问题 - 添加 onBeforeUnmount 清理所有 timer/RAF/内联样式 - FullPlayerMobile 缓存歌词分页状态,修复切歌后打开空白歌词页的 bug - PlayerSlider 新增 tooltip 延迟隐藏逻辑,避免拖拽后 tooltip 立即消失 - 移除 backdropFilter/contain 内联样式,减少合成层开销 - FullPlayer 添加 electron IPC 可选链,兼容 Android 环境
Author
|
同时修复了触摸穿透的问题 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix+perf(Player): 重构移动端拖拽开启播放器逻辑并优化歌词渲染性能
📌 变更类型
📝 变更说明
修复界面会卡顿的现象。
同时修复了悬浮控制栏的左右切歌会被绑定到进度条上的问题。
移动端全屏播放器的拖拽开启流程补充了异步挂载重试、关闭动作打断兜底和内联样式清理逻辑,解决 Transition 挂载竞态、关闭动画被新手势打断后卡住、FullPlayer 残留 transform 导致不可交互等问题。同时缓存移动端歌词分页状态,并修复切歌后可能打开到空白歌词页的问题。
进度条 tooltip 改为交互时显示、延迟隐藏,避免拖动结束后提示立即消失。部分拖拽动画中移除了
backdropFilter/contain等高开销内联样式,减少合成层压力。FullPlayer 中 Electron IPC 调用增加可选链,提升 Android / 非 Electron 环境兼容性。🔗 关联 Issue
暂无
📱 影响范围
✅ 自检清单
devpnpm lint且无 warningpnpm typecheck且无报错📸 截图 / 录屏 (UI 类 PR 必填)
🧪 测试方式
💬 其他说明 (选填)
本次改动主要集中在移动端播放器手势、全屏播放器过渡动画和 AMLL 歌词渲染体验。未引入新依赖,未修改原生 Android 代码、签名配置或 CI 配置。